/**
 * @Author: songjimin
 * @Date: 2022-04-01 11:12:18
 * @Version: 0.0.1
 * @Content: 校验规则
 * @example 单个添加
 **/

export const standardNameRegExp =
  /^([\u4E00-\u9FA5a-zA-Z0-9`~!@$%^*()-=_+[\];:'‘"?/？《》，。,.；：{}【】、|\\·！@￥%……*（）——+])([\u4E00-\u9FA5a-zA-Z0-9\s`~!@$%^*()-=_+[\];:'‘"?/？《》，。,.；：{}【】、|\\·！@￥%……*（）——+]{0,253}\S)?$/
export const platformNameRegExp =
  /^[\u4E00-\u9FA5a-zA-Z0-9`~!@$%^*()-=_+[\];:'‘"?/？《》，。,.；：{}【】、|\\·！@￥%……*（）——+]*$/ // 特殊字符除外0次或n次
export const englishOrNumRegExp = /^[a-zA-Z0-9]*$/ // 英文或数字0次或n次
export const standardDescRegExp = /^[\s\S]{1,5000}$/
// export const standardUpOneRegExp = /^(([1-9]\d+)|([2-9]))$/;
export const standardUpOneRegExp = /^[1-9][0-9]*$/ // >0的整数
export const standardNumberRegExp = /^[0-9]*$/
export const standardNumRegExp = /^([1-9]|1[0-9]|20)$/
export const standardLocationRegExp = /^\d+(\.\d+)?$/
export const standardLongitudeRegExp =
  /^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,15})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,15}|180)$/
export const standardLatitudeRegExp =
  /^(\-|\+)?([0-8]?\d{1}\.\d{0,15}|90\.0{0,15}|[0-8]?\d{1}|90)$/
export const standardPositionRegExp = /^\d+(\.\d+)?$/
export const standardColorRegExp =
  /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3}|[a-fA-F0-9]{8})$/
export const standardIpRegExp =
  /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/
